//------------------------------------------------------------
// Contact.java
//------------------------------------------------------------

public class Contact
{
	private String address, telephone_number,fax_number, mobile_number, email_address,  homepage ;
	private String first_name, last_name, position,department, company_name;
	

	//----------------------------------------------
	// �앹꽦��: �덈줈�� Contact 媛앹껜 �앹꽦
	//----------------------------------------------
	public Contact(String first_name, String last_name, String position, String department, String company_name, String address, String telephone_number, String fax_number, String mobile_number, String email_address, String homepage )
	{
		//First name, last name, position, department, company name, address, telephone number, fax number, mobile number, e-mail address, homepage 占쌨아울옙 占쏙옙占쏙옙占쏙옙 占십깍옙화
		
		this.first_name = first_name;
		this.last_name = last_name;
		this.position=position;
		this.department=department;
		this.company_name=company_name;
		this.address=address;
		this.telephone_number=telephone_number;
		this.fax_number=fax_number;
		this.mobile_number=mobile_number;
		this.email_address=email_address;
		this.homepage=homepage;
		      
		
	}
	
	public String getAddress(){
		return address;
	}		
	public String getCompany_name(){
		return company_name;
	}
	public String getDepartment(){
		return department;
	}
	public String getEmail_address(){
		return email_address;
	}
	public String getFax_number(){
		return fax_number;
	}
	//----------------------------------------------
	//媛��곹깭 蹂�닔����븳 accessor 
	//----------------------------------------------
	public String getFirst_name(){
		return first_name;
	}
	public String getHomepage(){
		return homepage;
	}
	public String getLast_name(){
		return last_name;
	}
	public String getMobile_number(){
		return mobile_number;
	}
	public String getPosition(){
		return position;
	}
	public String getTelephone_number(){
		return telephone_number;
	}
		
	//---------------------------------------------------
		// 연락처에 대한 정보를 파일에 저장할 형태로 바꾸어 리턴
		// GUI에서 저장 버튼 기능 구현할 때 쓰임
		//---------------------------------------------------
		public String saveBook(){
			return(last_name + "/"+ first_name + "/" + position + "/" +department + "/" + company_name 
					+ "/" + address + "/" + telephone_number + "/" + fax_number + "/" + mobile_number + "/" + email_address+"/"+ homepage);
			// 파일로 부터 읽어올 때 '/'를 delimiter로 사용하기 위해 이런 형태로 바꿈
		}

	public void setAddress(String addr){
		address= addr;
	}
	public void setCompany_name(String company){
		company_name = company;
	}
	
	public void setDepartment(String dep){
		department = dep;
	}
	
	public void setEmail_address(String email){
		email_address = email;
	}
	
	public void setFax_number(String fnumber){
		fax_number = fnumber;
	}
	
	//----------------------------------------------
	// 媛��곹깭 蹂�닔����븳 mutator
	//----------------------------------------------
	public void setFirst_name(String fname){
		first_name = fname;
	}
	
	public void setHomepage(String homep){
		homepage = homep;
	}
	
	public void setLast_name(String lname){
		last_name = lname;
	}
	
	public void setMobile_number(String mnumber){
		mobile_number = mnumber;
	}
	
	public void setPosition(String pos){
		position = pos;
	}
	
	
	
	public void setTelephone_number(String tnumber){
		telephone_number=  tnumber;
	}
	
	//----------------------------------------------
	//연락처에 대한 간단한 정보를 리턴
	//----------------------------------------------

	
	public String toString(){
		
		
		return("성:" + last_name + "\n이름: " +first_name + "\n직위: " + position + "\n부서 : " +department + "\n회사명: " + company_name 
			+ "\n주소: " + address + "\n전화번호:" + telephone_number +"\n팩스번호:" + fax_number+ "\n휴대폰번호 : " + mobile_number + "\n이메일: " + email_address+"\n홈페이지:"+ homepage);
	}
	
	
	
}	

